From: André Gaul Date: Sat, 3 Jan 2015 14:24:46 +0000 (+0100) Subject: [olsrd] adapt init script for 0.6.8 (PingCmd option) X-Git-Url: http://git.openwrt.org/%22https:/collectd.org//%22http:/www.crowdsec.net/%22/%22https:/collectd.org/%22http:/www.crowdsec.net/%22?a=commitdiff_plain;h=87d52fc40d0fc2946a2d4e1bca7a6082ec3a0f81;p=feed%2Frouting.git [olsrd] adapt init script for 0.6.8 (PingCmd option) olsrd 0.6.8 accepts a PingCmd parameter as of http://olsr.org/git/?p=olsrd.git;a=commitdiff;h=0a26c52af3941eb9060b193cae5552f8d13fd28e. The PingCmd is a string of the form "ping -c 1 -q %s" where %s is replaced with an IP. This commit allows for '%' characters in an olsrd option. --- diff --git a/olsrd/files/olsrd.init b/olsrd/files/olsrd.init index 887a4a2..5bee27a 100644 --- a/olsrd/files/olsrd.init +++ b/olsrd/files/olsrd.init @@ -38,7 +38,7 @@ validate_varname() { validate_olsrd_option() { local str="$1" - [ -z "$str" -o "$str" != "${str%%[! 0-9A-Za-z./|:_-]*}" ] && return 1 + [ -z "$str" -o "$str" != "${str%%[! 0-9A-Za-z.%/|:_-]*}" ] && return 1 return 0 }